<template>
  <editor :uploadImageConfig="uploadImageConfig"></editor>
  <tree-select v-bind="treeConfig" v-model="treeValue" />
</template>
<script setup>
import editor from '@/components/text-editor/EditorBase.vue';
import TreeSelect from '@/components/tree/TreeSelect.vue';
const uploadImageConfig = ref({
  server: 'http://192.168.100.25:9010/notification/uploadNotificationPic',
  fieldName: 'multipartFile',
});
const treeValue = ref('');
const treeConfig = ref({
  options: [
    {
      id: '803025ef-2ecd-4c9d-8f50-c3decc1fad0a',
      locationName: 'MCC GROUP',
      parentId: null,
      path: null,
      orgid: '803025ef-2ecd-4c9d-8f50-c3decc1fad0a',
      children: [
        {
          id: '1',
          locationName: 'aaaaaa',
          parentId: '0',
          path: '/0/1/',
          orgid: '803025ef-2ecd-4c9d-8f50-c3decc1fad0a',
          children: [
            {
              id: '2',
              locationName: 'bbbbb',
              parentId: '1',
              path: '/0/1/2/',
              orgid: '803025ef-2ecd-4c9d-8f50-c3decc1fad0a',
              children: [],
            },
            {
              id: '4',
              locationName: 'test',
              parentId: '1',
              path: '/0/1/4/',
              orgid: '803025ef-2ecd-4c9d-8f50-c3decc1fad0a',
              children: [
                {
                  id: '5',
                  locationName: 't4',
                  parentId: '4',
                  path: '/0/1/4/5/',
                  orgid: '803025ef-2ecd-4c9d-8f50-c3decc1fad0a',
                  children: [
                    {
                      id: '7',
                      locationName: 't58',
                      parentId: '5',
                      path: '/0/1/4/5/7/',
                      orgid: '803025ef-2ecd-4c9d-8f50-c3decc1fad0a',
                      children: [],
                    },
                    {
                      id: '8',
                      locationName: 't59',
                      parentId: '5',
                      path: '/0/1/4/5/8/',
                      orgid: '803025ef-2ecd-4c9d-8f50-c3decc1fad0a',
                      children: [],
                    },
                  ],
                },
                {
                  id: '6',
                  locationName: 't467',
                  parentId: '4',
                  path: '/0/1/4/6/',
                  orgid: '803025ef-2ecd-4c9d-8f50-c3decc1fad0a',
                  children: [
                    {
                      id: '9',
                      locationName: 't69',
                      parentId: '6',
                      path: '/0/1/4/6/9/',
                      orgid: '803025ef-2ecd-4c9d-8f50-c3decc1fad0a',
                      children: [],
                    },
                  ],
                },
              ],
            },
          ],
        },
        {
          id: '3',
          locationName: 'cccccc',
          parentId: '0',
          path: '/0/3/',
          orgid: '803025ef-2ecd-4c9d-8f50-c3decc1fad0a',
          children: [],
        },
        {
          id: '11',
          locationName: '新增location',
          parentId: '0',
          path: '/0/11/',
          orgid: '803025ef-2ecd-4c9d-8f50-c3decc1fad0a',
          children: [],
        },
      ],
    },
  ],
  props: {
    label: 'locationName',
  },
  'node-key': 'id',
  'check-strictly': true,
  filterable: true,
});
</script>
